package poo.main;

import java.util.Scanner;

public class TestString {

	private static Scanner sc;

	public static void main(String[] args) {
		sc = new Scanner(System.in);
		String linea = sc.nextLine();
		linea = linea.trim();
		int i = linea.indexOf(' ');
		int j = linea.lastIndexOf(' ');
		String cognome = linea.substring(0, i);
		while (i < linea.length() && linea.charAt(i) == ' ') {
			i++;
		}

		String nome = linea.substring(j + 1);
		System.out.println(nome.charAt(0) + ". " + cognome);

	}
}
